package org.blame.controller;

import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 何彦声
 * Date: 2025-08-27
 * Time:
 */

@RequestMapping("/ai")
@RestController
public class ChatGptController {

    @Autowired
    private OpenAiChatModel openAiChatModel;
    @RequestMapping("/chat2")
    public String chat2(String message){
        return openAiChatModel.call(message);
    }
}
